<div class="blade-static">
    <div class="form-group">
        <div class="form-input __search">
            <input placeholder="{{ 'platform.placeholders.search-keyword' | translate }}" ng-model="blade.searchText">
            <button class="btn __other" style="position: relative;right: 45px;">
                <i class="btn-ico fa fa-remove" title="Clear" ng-click="blade.searchText=''"></i>
            </button>
        </div>
    </div>
</div>
<div class="blade-content">
    <div class="blade-inner">
        <div class="inner-block">
            <fieldset>
                <div class="table-wrapper">
                    <form name="formScope" class="form" style="padding-top:unset">
                        <table class="table __indexed" ng-class="{'__disabled': blade.currentEntity.isReadOnly}" ng-init="setForm(formScope)">
                            <thead>
                                <tr>
                                    <th class="table-col" ng-click="blade.selectedAll=!blade.selectedAll; checkAll()">
                                        <div class="ui-grid-selection-row-header-buttons ui-grid-icon-ok" ng-class="{'ui-grid-row-selected': blade.selectedAll}">&nbsp;</div>
                                    </th>
                                    <th class="table-col __link" ng-click="blade.orderDesc=!blade.orderDesc; applyOrder()">
                                        <span>
                                            {{ 'platform.blades.setting-dictionary.labels.value' | translate }}
                                        </span>
                                        <i ng-class="{ 'ui-grid-icon-up-dir': !blade.orderDesc, 'ui-grid-icon-down-dir': blade.orderDesc}"></i>
                                    </th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr class="table-item" ng-repeat="data in filteredEntities()" ng-class="{'__selected': data === selectedItem}" context-menu data-target="pd_menu_{{$index}}">
                                    <td class="table-col" ng-click="data.$selected=!data.$selected">
                                        <div class="ui-grid-selection-row-header-buttons ui-grid-icon-ok" ng-class="{'ui-grid-row-selected': data.$selected}">&nbsp;</div>
                                    </td>
                                    <td class="table-col" ng-click="selectItem(data)">
                                        <div ng-if="data===selectedItem">
                                            <div class="form-input">
                                                <div class="form-input" ng-if="blade.currentEntity.valueType !== 'Number'">
                                                    <input id="dictValue" autocomplete="off" required ng-model="editValue.value" maxlength="512" ng-blur="selectItem(null)" ng-keyup="inputKeyUp($event)"/>
                                                </div>
                                                <div class="form-input __number" ng-if="blade.currentEntity.valueType === 'Number'">
                                                    <input id="dictValue" autocomplete="off" smart-float required ng-model="editValue.value" maxlength="36" num-type="float" ng-blur="selectItem(null)" ng-keyup="inputKeyUp($event)"/>
                                                </div>
                                                <button ng-mousedown="applyValue(true)" ng-mouseup="applyValue(true)" type="button" class="btn">
                                                    <i class="btn-ico fas fa-save" ng-class="icon"></i>
                                                </button>
                                            </div>
                                            <div class="form-error" ng-if="error">
                                                <span>{{ 'platform.blades.setting-dictionary.validations.new-value' | translate }}</span>
                                            </div>
                                        </div>
                                        <div ng-if="data!==selectedItem">
                                            <span class="table-t">{{data.value}}</span>
                                        </div>
                                        <ul role="menu" class="menu __context" id="pd_menu_{{$index}}">
                                            <li class="menu-item" ng-click='delete($index)'>
                                                <i class="menu-ico fas fa-trash-alt"></i> {{ 'platform.commands.delete' | translate }}
                                            </li>
                                        </ul>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </form>
                </div>
            </fieldset>
        </div>
    </div>
</div>
